import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
import React, { memo } from "react";
import styles from "./index.module.less";
import classnames from "classnames";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var Component = function(props) {
    var getClassName = // function onTouchMove(event: any) {
    //   event.stopPropagation();
    // }
    function getClassName() {
        var classNameArray = [
            styles.Modal,
            className
        ];
        if (!open) {
            classNameArray.push(styles.Modal__hide);
        }
        classNameArray.push(styles.Modal__center);
        return classnames.apply(void 0, _to_consumable_array(classNameArray));
    };
    var open = props.open, onClose = props.onClose, _props_mask = props.mask, mask = _props_mask === void 0 ? true : _props_mask, _props_maskClosable = props.maskClosable, maskClosable = _props_maskClosable === void 0 ? true : _props_maskClosable, className = props.className, style = props.style, _props_isMaskOpacity = props.isMaskOpacity, isMaskOpacity = _props_isMaskOpacity === void 0 ? false : _props_isMaskOpacity, contentClassName = props.contentClassName;
    return /*#__PURE__*/ _jsxs("div", {
        className: getClassName(),
        style: style,
        children: [
            mask && /*#__PURE__*/ _jsx("div", {
                onClick: function() {
                    return onClose && onClose();
                },
                className: isMaskOpacity ? styles.Modal_mask_Opacity : styles.Modal_mask
            }),
            /*#__PURE__*/ _jsx("div", {
                className: classnames(styles.Modal_content, contentClassName),
                children: props.children
            })
        ]
    });
};
var Mask = /*#__PURE__*/ memo(Component);
export default Mask;

 //# sourceMappingURL=index.js.map